package cn.lsnu.heritage.model.doc;

import cn.lsnu.heritage.model.domain.IcHeritage;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
public class HeritageDoc {
    private Integer id;
    private String name;
    private String address;
    private Integer categoryId;
    private String description;
    private Long accessTotal;
    private String location;
    private Date createTime;
    private String city;

    public HeritageDoc(IcHeritage heritage) {
        this.id = heritage.getId();
        this.name = heritage.getName();
        this.address = heritage.getAddress();
        this.categoryId = heritage.getCategoryId();
        this.description = heritage.getDescription();
        this.accessTotal = heritage.getAccessTotal();
        this.location = heritage.getLocation();
        this.createTime = heritage.getCreateTime();
        this.city = heritage.getCity();
    }
}
